<template>
  <a-card class="content" :bordered="false">
    <div class="table_caozuo">
      <template v-for="(item,index) in btn">
        <a-button
          :key="index"
          @click="handler(index)"
          type="primary"
          icon="plus"
          v-if="item.isShow"
        >{{item.title}}</a-button>
      </template>
    </div>
    <a-table
      rowKey="purchaseInfoId"
      :columns="platformOrderListColumns"
      :dataSource="loadData"
      :pagination="false"
      :loading="loading"
      :scroll="{ x:1720}"
    >
      <template slot-scope="text,record,index" slot="indexLabel">
        <span>{{index+(page.current - 1) * page.size + 1}}</span>
      </template>
      <span slot="action" slot-scope="text,row">
        <template>
          <a-button type="link" @click="dropOrder(row)" v-if="row.status == '00'">取消</a-button>
          <!-- <a-button type="link" @click="edit(row)">编辑</a-button> -->
          <a-button type="link" @click="detail(row)">详情</a-button>
        </template>
      </span>
    </a-table>
    <template>
      <div style="width:100%;position:relative;height:60px">
        <a-pagination
          show-quick-jumper
          show-size-changer
          v-model="page.current"
          :page-size-options="['10', '20', '30', '40', '50']"
          :total="page.total"
          :page-size.sync="page.size"
          @showSizeChange="onShowSizeChange"
          @change="onShowSizeChange"
          :show-total="total => `共 ${total} 条`"
          style="margin:2% 0;position:absolute;right:1%"
        />
      </div>
    </template>
    <!-- <a-modal
      :title="dialogVisibleTile"
      v-model="dialogVisible"
      width="35%"
      :destroy-on-close="true"
    >
      <el-form
        :model="ruleForm"
        :rules="rules"
        ref="ruleForm"
        labelWidth="100px"
        class="demo-ruleForm"
      >
        <el-row :gutter="10">
          <el-col :xs="24" :sm="24">
            <el-form-item label="类目名称：" prop="categoryName">
              <a-input
                v-model="ruleForm.categoryName"
                placeholder="请输入分组名称，不超过15个字"
                @change="lmmcChange"
                :disabled="disabled"
                maxlength="15"
              />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <a-button @click="handleClose">取 消</a-button>
        <a-button type="primary" @click="handleSure()" :loading="loading">确 定</a-button>
      </div>
    </a-modal>-->
  </a-card>
</template>

<script src='./platformOrderList.js'></script>

<style lang="less">
.content {
  & > .ant-card-body {
    padding: 0;
    padding-top: 8px;
  }
}
</style>